<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>三级认证</title>

    <link href="../plugin/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-table-1.11.1/bootstrap-table.min.css" rel="stylesheet"/>
    <link href="../plugin/sweetalert-6.6.2/sweetalert2.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-3.3.7/plugin/file_input/fileinput.min.css" rel="stylesheet"/>
    <link href="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
    <link href="../plugin/jquery-zoomify/zoomify.min.css" rel="stylesheet"/>

    <script src="../plugin/jquery-3.2.1/jquery-3.2.1.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/js/bootstrap.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/file_input/fileinput.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/file_input/local_zh.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.min.js"></script>
    <script src="../plugin/bootstrap-3.3.7/plugin/datatimepicker/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="../plugin/bootstrap-table-1.11.1/bootstrap-table.min.js"></script>
    <script src="../plugin/bootstrap-table-1.11.1/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="../plugin/sweetalert-6.6.2/sweetalert2.min.js"></script>
    <script src="../plugin/jquery-3.2.1/jquery.formautofill.min.js"></script>
    <script src="../plugin/jquery-3.2.1/jquery.serializejson.js"></script>
    <script src="../plugin/wangEditor-3.0.15/wangEditor.min.js"></script>
    <script src="../plugin/jquery-zoomify/zoomify.min.js"></script>
    <script src="../plugin/soul/utils3.js"></script>
    <script src='../base/base.js'></script>

</head>

<body>
<!--查看用户信息模态框-->
<div class="modal fade" data-backdrop="static" id="apply_mlp_modal_show_user_info">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button class="close" data-dismiss="modal">
                    <span>&times;</span>
                </button>
                <h4 class="modal-title">
                    <b>手机信息</b>
                </h4>
            </div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="form-group"><label class="col-sm-2 control-label">区号:</label>
                        <div class="col-sm-9">
                            <input type="text" id="apply_mlp_modal_show_user_info_area_code" name="apply_mlp_modal_show_user_info_area_code"
                                   class="form-control" placeholder="请输入文本">
                            &nbsp;&nbsp;
                        </div>
                    </div>
                    <div class="form-group"><label class="col-sm-2 control-label">手机号:</label>
                        <div class="col-sm-9">
                            <input type="text" id="apply_mlp_modal_show_user_info_phone" name="apply_mlp_modal_show_user_info_info_phone"
                                   class="form-control" placeholder="请输入文本">
                            &nbsp;&nbsp;
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        var resp = AjaxUtil.isLogin();
        if (!resp) return;
        var module = 'approve_record';
        var query = [];
        var toolbar = {
            default: [false, false, false, false],// back;add;edit;remove
            dialog: [60, 2, 9],//对话框参数:模态框宽度(百分比);表单标题宽度;表单输入框宽度
            extra: [{
                name: '审批通过',
                glyphicon: 'list',
                onclick: 'mlpApprove(1)'
            }, {
                name: '审批不通过',
                glyphicon: 'list',
                onclick: 'mlpApprove(-1)'
            },{
                name: '用户手机信息',
                glyphicon: 'list',
                onclick: 'showUserInfo',
            }]
        };

        // 表格配置
        var bootstrapTable = {
            url: '/admin/approve_record/mlp_apply_list?token=' + BaseConfig.token,
            columns: [{
                radio: true
            }, {
                field: 'email',
                title: '用户邮箱',
                align: 'center'
            },{
                field: 'multiplePhoto',
                title: '手持认证照',
                align: 'center',
                formatter: function (value, row, index) {
                    var bigPath = '/resource/images/approve/' + value;
                    var path = '/resource/images/approve/snapshoot/' + value;
                    var html = '<a href="' + bigPath + '" target="_blank"><img height = "60px" src="' + path + '"></a>';
                    return html;
                }
            }, {
                field: 'multipleRenewalDate',
                title: '申请时间',
                align: 'center',
                formatter: BootstrapTableUtil.formatter.datetime
            }]
        };
        approve_record = SingleTablePageCreateUtil.createInstance(module, query, toolbar, null, bootstrapTable);
        approve_record.mlpApprove = function (status) {
            var row = TablePageCreatePublicUtil.getRowFromTable('#approve_record_table');
            if (!row) return false;
                var resp = AjaxUtil.postJson('approve_record/mlp_approval', {
                    approveRecordId: row.approveRecordId,
                    multipleStatus: status
                });
                if (resp) {
                    SwalUtil.success(resp.msg);
                    $('#approve_record_table').bootstrapTable('refresh');
                }
        }
        approve_record.showUserInfo=function () {
            var row = TablePageCreatePublicUtil.getRowFromTable('#approve_record_table');
            if (!row) return false;

            var resp = AjaxUtil.getJson('approve_record/show_user_info', 'userId=' + row.userId);
            if (!resp) return false;

            var user = resp.obj;

            $('#apply_mlp_modal_show_user_info_area_code').val(user.areaCode);
            $('#apply_mlp_modal_show_user_info_phone').val(user.phone);
            $('#apply_mlp_modal_show_user_info').modal('show');
        }
    });
</script>
</body>

</html>